package org.example;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class RabmqConsumApplication {
    public static void main(String[] args) {
        SpringApplication.run(RabmqConsumApplication.class);
    }
    @RabbitListener(queues ="queue_msg")
    public void queueMsgA(String msg){
        System.out.println("A接收到消息"+msg);
    }
    @RabbitListener(queues ="queue_msg")
    public void queueMsgB(String msg){
        System.out.println("B接收到消息"+msg);
    }
}
